<template>
  <div class="merchant" v-if="sellerInfo">
    <section>
      <img :src="sellerInfo.header_image" alt="">
      <h3>{{sellerInfo.title}}</h3>
      <p>{{sellerInfo.brand_intros[0].brief}}</p>
      <div>查看品牌故事</div>
    </section>
  </div>
</template>

<script>
export default {
  name: 'MyMerchant',
  created() {
    this.getData()
  },
  data() {
    return {
      sellerInfo: null
    }
  },
  methods: {
    getData() {
      this.$http('/api/profile/seller').then(res => {
        this.sellerInfo = res.data
      })
    }
  }
}
</script>

<style scoped lang="less">
.merchant {
  section {
    padding: 0 10px;
    img {
      height: 200px;
    }
    p {
      -webkit-line-clamp: 2;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-box-orient: vertical;
    }
    div {
      color: #666;
    }
  }
}
</style>
